<?
	$sess = new Zend_Session_Namespace(CLU_NS);
?>
<div class="box_gallery">
    <div class="topArticle" >
            <ul class="bd" >
            <?foreach ($this->viewParams['places'] as $k => $place) :?>
            <? 
            	$link = $this->hvnUrl(array("module" => "place", "action" => "view"), "nocontroller") . "?id=" . $place['id'];
            	$image = str_replace("/original/", "/xlarge/", $place['thumb']);
            	$thumb = str_replace("/original/", "/small/", $place['thumb']);
            	$title = $place['article_data']['article_title'];
            	$desc = str_first_words(strip_tags($place['article_data']['article_body']), 30);
            ?>
            <?if ($k == 0) :?> 
        	<li id="place_<?=$place['id']?>" class="tabcontent" style="display: block;">
        	<?else :?>
        	<li id="place_<?=$place['id']?>" class="tabcontent" style="display: none;" >
        	<?endif?>
        	<a href="<?=$link?>">
        	<img src="<?=$image ?>" align="left" border="0" vspace="0" width="420" hspace="0">
        	</a>
        	<a href="<?=$link?>" class="des">
        	<p class="tit"><?=$title ?></p>
            <p><?=$desc?></p></a><a class="mask"></a>
            </li>
            <?$lang = $place['article_data']['article_language']?>
            <script type="text/javascript">
				var oriLang = '<?=$lang?>';
				var lang = '<?= $sess->viewLang?>';
			    googleTranslate(oriLang, lang, 'tit', 'des');
			</script>
			<?endforeach ?>
            </ul>

    		<div style="clear:both; background: ;"></div> 
            
            <ul class="hd" id="article_Nav">
            <?foreach ($this->viewParams['places'] as $k => $place) :?>
            <? 
            	$link = $this->hvnUrl(array("module" => "place", "action" => "view"), "nocontroller") . "?id=" . $place['id'];
            	$image = str_replace("/original/", "/medium/", $place['thumb']);
            	$thumb = str_replace("/original/", "/small/", $place['thumb']);
            	$title = $place['article']['article_title'];
            	$desc = str_first_words(strip_tags($place['article']['article_body']), 30);
            ?>
        
        	<?if ($k == 0) :?> 
            <li><a class="current" href="<?=$link?>" rel="place_<?=$place['id']?>">
            <?else :?> 
            <li><a class="" href="<?=$link ?>" rel="place_<?=$place['id']?>">
			<?endif?>
            <img src="<?=$thumb?>" align="left" border="0" vspace="5" width="50" height="50" hspace="5">
            </a></li>
            <?endforeach ?>
            </ul>
	</div>
</div>
